Skip to content

Update cuenca-validations to version 2.1.31.dev0, increment internal …#440

Open
rcabrera-py wants to merge 2 commits intomainfrom
feat/add-reset-password
Open

Update cuenca-validations to version 2.1.31.dev0, increment internal …#440
rcabrera-py wants to merge 2 commits intomainfrom
feat/add-reset-password

Conversation

@rcabrera-py
Copy link
Copy Markdown
Contributor

@rcabrera-py rcabrera-py commented May 6, 2026

…version to 2.1.20.dev0, and add PasswordReset resource with tests.

Summary by CodeRabbit

  • New Features

    • Added PasswordReset resource to the public API, enabling password reset create/retrieve/list operations with coordinate-based location support.
  • Chores

    • Aligned sandbox host with production API.
    • Bumped package version to 2.1.20.dev1.
    • Updated dependency cuenca-validations to 2.1.31.dev1.
  • Tests

    • Added tests covering PasswordReset workflows.

…version to 2.1.20.dev0, and add PasswordReset resource with tests.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Review Change Stack
No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a5485bc7-f7f4-401d-8191-d6e1d9460717

📥 Commits

Reviewing files that changed from the base of the PR and between fcb5ae5 and 8663f46.

📒 Files selected for processing (4)
  • cuenca/resources/password_resets.py
  • cuenca/version.py
  • requirements.txt
  • tests/resources/test_password_resets.py
✅ Files skipped from review due to trivial changes (2)
  • requirements.txt
  • cuenca/version.py
🚧 Files skipped from review as they are similar to previous changes (2)
  • tests/resources/test_password_resets.py
  • cuenca/resources/password_resets.py

Walkthrough

Adds a PasswordReset resource class (creatable, retrievable, queryable) with fields, JSON schema example, and a create(location) API. Exposes PasswordReset in package exports and registers it in resources. Updates SANDBOX_HOST to api.cuenca.com, bumps version to 2.1.20.dev1, updates cuenca-validations to 2.1.31.dev1, and adds pytest tests for create/retrieve/list flows.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • alexviquez
  • rogelioLpz
  • felipao-mx
🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The PR title mentions updating cuenca-validations but is truncated/incomplete ('increment internal …'), making it vague about the primary changes including the new PasswordReset resource. Complete the title to clearly specify all main changes, for example: 'Add PasswordReset resource and update dependencies to version 2.1.31.dev1'
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/add-reset-password

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@cuenca/http/client.py`:
- Line 21: SANDBOX_HOST is incorrectly set to the same value as API_HOST so
configure(sandbox=True) doesn't switch environments; restore a distinct sandbox
hostname by changing the SANDBOX_HOST assignment (symbol SANDBOX_HOST in
cuenca/http/client.py) back to the sandbox-specific host used by the service and
ensure configure(sandbox=True) uses SANDBOX_HOST instead of API_HOST (refer to
the configure(sandbox=True) logic and any host-selection code that reads
API_HOST/SANDBOX_HOST).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f579c9db-d1a0-4fa8-a059-4ca9028b44df

📥 Commits

Reviewing files that changed from the base of the PR and between f33c0e5 and fcb5ae5.

📒 Files selected for processing (7)
  • cuenca/__init__.py
  • cuenca/http/client.py
  • cuenca/resources/__init__.py
  • cuenca/resources/password_resets.py
  • cuenca/version.py
  • requirements.txt
  • tests/resources/test_password_resets.py

Comment thread cuenca/http/client.py

API_HOST = 'api.cuenca.com'
SANDBOX_HOST = 'sandbox.cuenca.com'
SANDBOX_HOST = 'api.cuenca.com'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Restore a distinct sandbox host for sandbox mode.

Line 21 makes SANDBOX_HOST equal to API_HOST, so configure(sandbox=True) no longer changes environment. This collapses sandbox/prod separation and matches the observed 403 failures in password reset tests.

🔧 Proposed fix
 API_HOST = 'api.cuenca.com'
-SANDBOX_HOST = 'api.cuenca.com'
+SANDBOX_HOST = 'sandbox.cuenca.com'
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cuenca/http/client.py` at line 21, SANDBOX_HOST is incorrectly set to the
same value as API_HOST so configure(sandbox=True) doesn't switch environments;
restore a distinct sandbox hostname by changing the SANDBOX_HOST assignment
(symbol SANDBOX_HOST in cuenca/http/client.py) back to the sandbox-specific host
used by the service and ensure configure(sandbox=True) uses SANDBOX_HOST instead
of API_HOST (refer to the configure(sandbox=True) logic and any host-selection
code that reads API_HOST/SANDBOX_HOST).

…_id from PasswordReset resource, and adjust related tests.
@rcabrera-py rcabrera-py force-pushed the feat/add-reset-password branch from ea039ae to 8663f46 Compare May 8, 2026 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant